Skip to content

fix: update, delete, accept, decline all occurrences - #7600

Open
SebastianKrupinski wants to merge 1 commit into
mainfrom
fix/issue-3355-delete-update-all-occurrences
Open

fix: update, delete, accept, decline all occurrences#7600
SebastianKrupinski wants to merge 1 commit into
mainfrom
fix/issue-3355-delete-update-all-occurrences

Conversation

@SebastianKrupinski

@SebastianKrupinski SebastianKrupinski commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Summary

Logic Changes

  • As organizer all actions, update and delete, are applicable to either the this occurrence, this occurrence and all future, and all occurrences, this is manually controlled with no "why did this happen"

  • When editing a base/primary occurrence "this occurrence" and "This and future" updates/deletes are not permitted

  • When editing a occurrence exemption "this series" updates/deletes are not permitted

  • When editing a occurrence time updates with "this series" are not permitted as this can truncate the series history, to change the time of the entire series you must edit the first occurrence

Screenshot 2026-08-25 113759 Screenshot 2026-08-25 113805
  • As participant all actions are restricted based on the instance type of the event. normal series instance or exemption instance. When accepting/declining of updating a normal series instance the changes are applied to the entire series. When accepting/declining or updating a exemption instance, the changes are applied to the exemption instance.
image

@codecov

codecov Bot commented Oct 20, 2025

Copy link
Copy Markdown

@Jerome-Herbinet

Copy link
Copy Markdown
Member

Hi,
Any news about this development's progression ?
I think that this development is actually important for web UI end-users.
Thanks !

@IT-Seezeit

Copy link
Copy Markdown

Hello,

that's a big problem for us too. It would be great if that could be fixed soon.
Thanks

@Jerome-Herbinet

Copy link
Copy Markdown
Member

@SebastianKrupinski ; may this PR resolve #6146 as well ?

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

@SebastianKrupinski ; may this PR resolve #6146 as well ?

That is the idea, I just need to figure out the best work flow logic.

@SebastianKrupinski SebastianKrupinski changed the title fix: update, delete, accept, devline all occurrences fix: update, delete, accept, decline all occurrences Aug 25, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch 6 times, most recently from 928f361 to 9b343a4 Compare August 25, 2026 15:57
@SebastianKrupinski
SebastianKrupinski marked this pull request as ready for review August 25, 2026 16:41
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

PHP errors are unrelated

@SebastianKrupinski SebastianKrupinski added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 25, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from 9b343a4 to ebf29dc Compare August 27, 2026 13:46
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable6.6

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

@odzhychko should be good now

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from 8b424b7 to cc7fd03 Compare August 27, 2026 15:14

@odzhychko odzhychko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. Works as expected.

Aside from the failing tests,
https://github.com/nextcloud/calendar/pull/7600/changes#r3878791313 might be a blocking issues.

Comment thread src/views/EditFull.vue Outdated
Comment thread src/views/EditFull.vue Outdated
Comment thread src/views/EditFull.vue
@@ -154,16 +185,10 @@ export default {
async setParticipationStatus(participationStatus) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit(non-blocking): changeAttendeesParticipationStatus is not unused.

Comment thread src/store/calendarObjectInstance.js Outdated
Comment thread src/store/calendarObjectInstance.js
Comment thread src/store/calendarObjectInstance.js Outdated
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch 2 times, most recently from 32619c4 to c26c525 Compare August 31, 2026 13:02
Comment thread src/store/calendarObjectInstance.js Outdated
Comment thread src/store/calendarObjectInstance.js Outdated
Comment thread src/store/calendarObjectInstance.js
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

@odzhychko Do you mind giving this one last test!?

@odzhychko odzhychko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked and tested the fix for the last issue.
Found two broken edge case with regards to saving series.

I've seen that some more code changed in the meanwhile.
I'll try to look at it and retest PR from scratch after the know issues are fixed ^^

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch 2 times, most recently from 56588d5 to afb5911 Compare September 1, 2026 18:29

if (eventComponent.isDirty()) {
const isForkedItem = eventComponent.primaryItem !== null
if (eventComponent.isDirty() && eventComponent.isPartOfRecurrenceSet() && scope === 'series') {

@odzhychko odzhychko Sep 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: updating date of series master silently loses exception

Caused by nextcloud/calendar-js#923 (comment)

  • Create event "X"
    • full-day
    • start date 31 August 2026
    • repeat weekly on Friday
  • Edit recurrence on the 18 September 2026
    • change name to "Xa"
    • set date to 19 September 2026
    • Save with "Update this occurrence"
  • Edit the first event (4 September 2026)
    • Set name to "Xb"
    • Set date to 2 September 2026
    • Save with "Update entire series"
  • Expected behavior
    • All instances of "X" are renamed to "Xb"
    • Exception "Xa" remains on the 19 September
  • Other possible expected behaviour
    • Dialog warning user that the exception "Xa" will be deleted
    • Dialog having option to cancel operation
  • Actual behaviour
    • Exception "Xa" is silently lost

(Tested with changes from nextcloud/calendar-js#923)

@SebastianKrupinski SebastianKrupinski Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Date change worked

image

Are you sure you are using the correct changes??

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pretty sure.
I event build a local version of the latest changes in calendar-js.
But will retest again and make sure I'm testing with the latest changes.

Could we make a release of https://github.com/nextcloud/calendar-js first and use it here?
This will reduce the chance of testing the wrong version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make a release of https://github.com/nextcloud/calendar-js first and use it here?
This will reduce the chance of testing the wrong version.

Already in the process of doing it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it together and could reproduce it. But it only happens on the first edit of the series. On subsequent changes to the series the start date of the series and the first recurrences align and this issue does not occur anymore.

Comment thread src/store/calendarObjectInstance.js
Comment thread src/store/calendarObjectInstance.js
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch 5 times, most recently from bb6f0c0 to 52aacab Compare September 4, 2026 19:13
@SebastianKrupinski

SebastianKrupinski commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Manual test — recurring event save/delete scopes

Setup: create one non-recurring event, and one recurring event (e.g. weekly, 5+ occurrences) with no exceptions yet, in a writable calendar.

Non-recurring events

  • Create a new event, save it — appears correctly on the grid.
  • Edit title/time/location on an existing non-recurring event, save — updates correctly.
  • Delete a non-recurring event — the single event disappears.
  • Move a non-recurring event to a different calendar — moves without duplicating.

Recurring series — editing the first/primary occurrence

  • Open the first occurrence, change a non-date property (e.g. location), save with "This and all occurrences" / series — change applies to the whole series.
  • Open the first occurrence, change the date/time, save as series — the whole series shifts accordingly (no warning shown).
  • Open the first occurrence — confirm only "series" is offered for both update and delete (no "this occurrence" / "this and future" options).
  • Delete the first occurrence with series scope — the entire series is deleted.
  • Move the first occurrence to another calendar (series scope) — whole series moves, no duplicates left behind.

Recurring series — editing an nth (non-primary) occurrence

  • Open a middle occurrence, change a non-date property, save as series — property applies to the whole series; occurrence's own date/time is untouched.
  • Open a middle occurrence, change the date/time, save as series — a warning appears saying the date/time change was discarded; series keeps its original schedule; the editor itself shows the reverted (unchanged) time, not the discarded one.
  • Open a middle occurrence, change a property, save as "this occurrence" — only that single occurrence changes; the rest of the series is untouched; grid shows the change only on that date.
  • Open a middle occurrence, change a property, save as "this and future occurrences" — the original series is truncated (ends the day before), and a new separate series starts from that occurrence onward with the change applied.
  • Delete a middle occurrence with "this occurrence" — only that date disappears, rest of series remains.
  • Delete a middle occurrence with "this and future" — that occurrence and everything after it disappears, earlier occurrences remain.
  • Delete a middle occurrence with series — entire series is deleted.

Existing recurrence exceptions (an occurrence already moved/edited once)

  • Create an exception first (edit one occurrence with "this occurrence" scope, changing its date/time so it's visually distinct).
  • Re-open that exception — confirm only "this occurrence" is offered for both update and delete (no "series" / "this and future").
  • Edit the exception again (e.g. title) and save — updates just that exception, rest of series untouched.
  • Delete the exception — only that single occurrence is removed; the rest of the series (and the series itself) remains intact. (This was the bug we just fixed — worth double-checking carefully.)

Edge cases

  • All-day recurring event: edit a non-primary occurrence's date, save as series — discard warning behaves the same as a timed event, no crash.
  • Recurring event whose start date doesn't align with its own BYDAY rule (e.g. weekly-Monday rule but DTSTART on a Thursday) — first occurrence is still correctly treated as "primary" for the series-only restriction.
  • Change only the timezone (not the actual time) on a non-primary occurrence, save as series — still triggers the discard warning.
  • Toggle an occurrence to/from all-day only (same start instant), save as series — still triggers the discard warning.

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch 3 times, most recently from 4af4be7 to e61963f Compare September 4, 2026 20:55
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-3355-delete-update-all-occurrences branch from e61963f to 7a1ac72 Compare September 4, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request A backport was requested for this pull request

Projects

Status: 🏗️ In progress

4 participants